package facilitator;

import core.CalculationException;
import core.PdmOptimization;
import util.Util;


public class StoreItem implements Comparable<StoreItem>{
	public double alpha;
	public PdmOptimization pdmOptimization;
	
	public StoreItem(double alpha, PdmOptimization pdmOptimization) {
		super();
		this.alpha = alpha;
		this.pdmOptimization = pdmOptimization;
	}

	@Override
	public int compareTo(StoreItem o) {
		try {
			if(this.pdmOptimization.getProfileDistance() > o.pdmOptimization.getProfileDistance()){
				return 1;
			}
			else{
				return -1;
			}
		} catch (CalculationException e) {
			e.printStackTrace();
			return 0;
		}
	}
}
